package com.ruicar.afs.cloud.risk.api.dto.tortoise.request;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseExposurePersonType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Description
 * @Author Peng Jinbo
 * @Date 2020/08/04 14:21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TortoiseExposurePerson implements Serializable {

    private String userId;

    private String name;

    private String phone;

    private String card;

    private String company;

    @JSONField(name = "type",serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonProperty("type")
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseExposurePersonType type;

}
